import {Authority} from '../request'

const {get, post} = Authority

// 获取货品分类列表
export const getGoodsType = params => get('/erp/goods-type/v1/queryList', {params})

// 获取计量单位列表
export const getGoodsUnit = params => get('/erp/goods-unit/v1/queryList', {params})



// 新增计量单位
export const addGoodsUnit = params => post('/erp/goods-unit/v1/add', params)
// 新增货品分类
export const addGoodsType = params => post('/erp/goods-type/v1/add', params)

// 删除计量单位
export const delGoodsUnit = params => post('/erp/goods-unit/v1/delete', params)
// 删除货品分类
export const delGoodsType = params => post('/erp/goods-type/v1/delete', params)


//获取货品列表
export const getGoodsList= params => get('/erp/goods/v1/queryList', {params})
//获取货品选择列表
export const getGoodsSelectList= params => post('/erp/goods/v1/querySelectList', {params})

// 新增货品
export const addOrUpdateGoods = params => post('/erp/goods/v1/addOrUpdate', params)
// 新增更新货品组成
export const addOrUpdateGoodsCompose = params => post('/erp/goods-formation/v1/addOrUpdate', params)

// 获取货品组成
export const getGoodsCompose = params => get('/erp/goods-formation/v1/queryListByGoodsId', {params})



// 获取公司信息
export const getCompanyList = params => get('/erp/company-info/v1/queryList', {params})
// 获取供应商列表和公司
export const getCompanySelectList = params => get('/erp/company-info/v1/querySelectList', {params})
// 新增更新公司信息
export const addOrUpdateCompany = params => post('/erp/company-info/v1/addOrUpdate', params)
